/*
 * Pose2d.java
 *
 * Created on 16 de agosto de 2007, 11:43 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package Utils;
import javaclient3.structures.PlayerPose;
/**
 *
 * @author jonathan
 */
public class Pose2d extends PlayerPose {
    
    /** Creates a new instance of Pose2d */
    public Pose2d(float x,float y,float t) {
        super();
        this.setPa(t);
        this.setPx(x);
        this.setPy(y);
        
    }
    
    public void add(Pose2d other){
        this.setPx(this.getPx()+other.getPx());
        this.setPy(this.getPy()+other.getPy());
        this.setPa(this.getPa()+other.getPa());
    }
    
    public void sub(Pose2d other){
        this.setPx(this.getPx()-other.getPx());
        this.setPy(this.getPy()-other.getPy());
        this.setPa(this.getPa()-other.getPa());
    }
    
    public void copy(Pose2d pose){
        pose.setPx(this.getPx());
        pose.setPy(this.getPy());
        pose.setPa(this.getPa());
        
    
    }
    
    public void print()
    {
        System.out.println("POSE2D: xpos: "+this.getPx()+" ypos: "+this.getPy()+" head: "+this.getPa()+"\n");
    }

    public boolean equals(Pose2d pose)
    {
        if(this.getPa() != pose.getPa() || this.getPx() != pose.getPx() || this.getPy() != pose.getPy())
            return false;
        else
            return true;
    }
}
